
#pragma once

#include "type.h"
#include "gamemessage.h"

#include <map>
using namespace std;
    
class GameUILayer: public Layer, public TargetedTouchDelegate, public MessageHolder{
public:
    GameUILayer();
    virtual ~GameUILayer();

	CREATE_FUNC(GameUILayer);

	void showEnemyWaveIndicator();

	virtual bool ccTouchBegan( Touch *pTouch, Event *pEvent );
	virtual void ccTouchMoved( Touch *pTouch, Event *pEvent );
	virtual void ccTouchEnded( Touch *pTouch, Event *pEvent );
	virtual void ccTouchCancelled( Touch *pTouch, Event *pEvent );

private:
    virtual bool init();
	virtual void update(float ticks);
	virtual void handleMessage();

	void onPauseGame(Object* obj);
	void removeNodeByTag(int tag);
	void removeNode(Node* node);

	bool handleTouchWaveIndicators(const Point& pt);

private:
	vector<Sprite*> _waveIndicators;

	LabelBMFont* _goldQuantity;
	LabelBMFont* _levelTitle;
    
	char buf[100];
};
